package com.ruoyi.pollution.service.impl;

import java.util.Date;
import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pollution.mapper.BusPsBasMonitoringschemeMapper;
import com.ruoyi.pollution.domain.BusPsBasMonitoringscheme;
import com.ruoyi.pollution.service.IBusPsBasMonitoringschemeService;

/**
 * 监测方案Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-16
 */
@Service
public class BusPsBasMonitoringschemeServiceImpl implements IBusPsBasMonitoringschemeService 
{
    @Autowired
    private BusPsBasMonitoringschemeMapper busPsBasMonitoringschemeMapper;

    /**
     * 查询监测方案
     * 
     * @param id 监测方案主键
     * @return 监测方案
     */
    @Override
    public BusPsBasMonitoringscheme selectBusPsBasMonitoringschemeById(String id)
    {
        return busPsBasMonitoringschemeMapper.selectBusPsBasMonitoringschemeById(id);
    }

    /**
     * 查询监测方案列表
     * 
     * @param busPsBasMonitoringscheme 监测方案
     * @return 监测方案
     */
    @Override
    public List<BusPsBasMonitoringscheme> selectBusPsBasMonitoringschemeList(BusPsBasMonitoringscheme busPsBasMonitoringscheme)
    {
        return busPsBasMonitoringschemeMapper.selectBusPsBasMonitoringschemeList(busPsBasMonitoringscheme);
    }

    /**
     * 新增监测方案
     * 
     * @param busPsBasMonitoringscheme 监测方案
     * @return 结果
     */
    @Override
    public int insertBusPsBasMonitoringscheme(BusPsBasMonitoringscheme busPsBasMonitoringscheme)
    {
        busPsBasMonitoringscheme.setId(UUID.randomUUID().toString());
        busPsBasMonitoringscheme.setUpdatetime(new Date());
        return busPsBasMonitoringschemeMapper.insertBusPsBasMonitoringscheme(busPsBasMonitoringscheme);
    }

    /**
     * 修改监测方案
     * 
     * @param busPsBasMonitoringscheme 监测方案
     * @return 结果
     */
    @Override
    public int updateBusPsBasMonitoringscheme(BusPsBasMonitoringscheme busPsBasMonitoringscheme)
    {
        busPsBasMonitoringscheme.setUpdatetime(new Date());
        return busPsBasMonitoringschemeMapper.updateBusPsBasMonitoringscheme(busPsBasMonitoringscheme);
    }

    /**
     * 批量删除监测方案
     * 
     * @param ids 需要删除的监测方案主键
     * @return 结果
     */
    @Override
    public int deleteBusPsBasMonitoringschemeByIds(String[] ids)
    {
        return busPsBasMonitoringschemeMapper.deleteBusPsBasMonitoringschemeByIds(ids);
    }

    /**
     * 删除监测方案信息
     * 
     * @param id 监测方案主键
     * @return 结果
     */
    @Override
    public int deleteBusPsBasMonitoringschemeById(String id)
    {
        return busPsBasMonitoringschemeMapper.deleteBusPsBasMonitoringschemeById(id);
    }
}
